Optimize Serena tool usage guidance for agentic planning#13078
Merged
Optimize Serena tool usage guidance for agentic planning#13078
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update and optimize usage prompt for Serena
Optimize Serena tool usage guidance based on workflow analysis
Feb 1, 2026
pelikhan
reviewed
Feb 1, 2026
.github/aw/serena-tool.md
Outdated
|
|
||
| The first language is the default fallback. | ||
|
|
||
| ## Detecting Repository Language |
Contributor
Author
There was a problem hiding this comment.
Removed the "Detecting Repository Language" section. Fixed in 38b4c7b.
.github/aw/serena-tool.md
Outdated
| - `activate_project` - Activate Serena for a workspace | ||
| - `restart_language_server` - Restart LSP if needed | ||
|
|
||
| ### Memory and State |
.github/aw/serena-tool.md
Outdated
…back Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
reviewed
Feb 1, 2026
| @@ -1,86 +1,323 @@ | |||
| # Serena Language Server Tool | |||
Contributor
There was a problem hiding this comment.
@copilot optimize the content of the file for agentic planning (this is a prompt of an agent)
Contributor
Author
There was a problem hiding this comment.
Optimized for agentic planning. Reduced from 323 to 173 lines (46% reduction), restructured as action-oriented decision guide with:
- Quick YES/NO decision criteria at top
- Categorized tool lists with one-line descriptions
- Step-by-step workflows instead of prose
- Concise patterns as numbered action sequences
- Scannable format with bold keywords and bullet points
Fixed in 194afe1.
…d and concise Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Optimize Serena tool usage guidance based on workflow analysis
Optimize Serena tool usage guidance for agentic planning
Feb 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Serena tool prompt lacked practical guidance optimized for AI agent decision-making. Analysis of 20 workflows revealed common patterns and anti-patterns. The file has been restructured from documentation-style to action-oriented agent prompt.
Changes
Redefined purpose and scope
Optimized for agentic planning
Documented production patterns
Tool reference
find_symbol,get_symbols_overview,find_referencing_code_snippetsreplace_symbol_body,insert_at_line,delete_linessearch_for_pattern,activate_project,onboardingCommon pitfalls section
editinstead)activate_projectfirstDecision tree
Removed per feedback
write_memory,read_memory,list_memories) and related best practicesResult
File optimized from 87 to 173 lines (originally expanded to 323). Agents can now make instant YES/NO decisions using top-of-file criteria, with all essential information in a scannable, action-oriented format following the pattern of other agent prompts in
.github/aw/.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.